package com.rk.kbk.model;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.rk.kbk.common.DateJsonDeserializer;
import com.rk.kbk.common.DateJsonSerializer;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;

/**
 * @EachPicture
 * @广告轮播图(each_picture)
 * @version : Ver 1.0
 */
@Entity
public class EachPicture implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * @备注:
     * @字段:id BIGINT(19)
     */
    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    @GenericGenerator(name="auto-identity",strategy="identity")
    @Column(updatable = false, columnDefinition="BIGINT(19) COMMENT ''")
    private java.lang.Long id;

    /**
     * @备注:
     * @字段:gmt_datetime DATETIME(19)
     */
    @Column(updatable = false, columnDefinition="DATETIME(19) COMMENT ''")
    @JsonSerialize(using=DateJsonSerializer.class)
    @JsonDeserialize(using=DateJsonDeserializer.class)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
    private java.util.Date gmtDatetime = new java.util.Date();


    @Column(columnDefinition="VARCHAR(100) COMMENT '区域代码'")
    private String areaCode;

    @Column(columnDefinition="VARCHAR(100) COMMENT '省'")
    private String province;

    @Column(columnDefinition="VARCHAR(100) COMMENT '市'")
    private String city;

    @Column(columnDefinition="VARCHAR(100) COMMENT '区'")
    private String area;

    @Column(columnDefinition="DATETIME(100) COMMENT '开始时间'")
    private Date startTime;

    @Column(columnDefinition="DATETIME(100) COMMENT '结束时间'")
    private Date endTime;
    /**
     * @备注:
     * @字段:upt_datetime DATETIME(19)
     */
    @Column(columnDefinition="DATETIME(19) COMMENT ''")
    @JsonSerialize(using=DateJsonSerializer.class)
    @JsonDeserialize(using=DateJsonDeserializer.class)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
    private java.util.Date uptDatetime = new java.util.Date();

    /**
     * @备注:对应模块类型(1首页顶部,2首页中部,3摄影作品,4商域,5首页广播,6积分商城)
     * @字段:type INT(10)
     */
    @Column(columnDefinition="INT(10) COMMENT '对应模块类型(1首页顶部,2首页中部,3摄影作品,4商域,5首页广播,6积分商城)'")
    private java.lang.Integer type;

    /**
     * @备注:
     * @字段:admin_id BIGINT(19)
     */
    @Column(columnDefinition="BIGINT(19) COMMENT ''")
    private java.lang.Long adminId;

    /**
     * @备注:图片地址
     * @字段:attachment_url TEXT(65535)
     */
    @Column(columnDefinition="TEXT(65535) COMMENT '图片地址'")
    private java.lang.String attachmentUrl;

    /**
     * @备注:链接地址
     * @字段:link_url VARCHAR(768)
     */
    @Column(columnDefinition="VARCHAR(768) COMMENT '链接地址'")
    private java.lang.String linkUrl;


    /**
     * @备注:0未过期1已过期
     * @字段:destatus INT(10)
     */
    @Column(columnDefinition="INT(10) COMMENT '0未过期1已过期'")
    private java.lang.Integer destatus;

    /**
     * @备注:标题
     * @字段:title VARCHAR(100)
     */
    @Column(columnDefinition="VARCHAR(100) COMMENT '标题'")
    private java.lang.String title;

    /**
     * @备注:内容
     * @字段:content VARCHAR(256)
     */
    @Column(columnDefinition="VARCHAR(256) COMMENT '内容'")
    private java.lang.String content;

    private java.lang.Integer advertType;//广告类型


    public EachPicture(){
    }

    public EachPicture(
            java.lang.Long id
    ){
        this.id = id;
    }



    public void setId(java.lang.Long id) {
        this.id = id;
    }

    public java.lang.Long getId() {
        return this.id;
    }


    public void setGmtDatetime(java.util.Date gmtDatetime) {
        this.gmtDatetime = gmtDatetime;
    }

    public java.util.Date getGmtDatetime() {
        return this.gmtDatetime;
    }


    public void setUptDatetime(java.util.Date uptDatetime) {
        this.uptDatetime = uptDatetime;
    }

    public java.util.Date getUptDatetime() {
        return this.uptDatetime;
    }


    public void setType(java.lang.Integer type) {
        this.type = type;
    }

    public java.lang.Integer getType() {
        return this.type;
    }


    public void setAdminId(java.lang.Long adminId) {
        this.adminId = adminId;
    }

    public java.lang.Long getAdminId() {
        return this.adminId;
    }


    public void setAttachmentUrl(java.lang.String attachmentUrl) {
        this.attachmentUrl = attachmentUrl;
    }

    public java.lang.String getAttachmentUrl() {
        return this.attachmentUrl;
    }


    public void setLinkUrl(java.lang.String linkUrl) {
        this.linkUrl = linkUrl;
    }

    public java.lang.String getLinkUrl() {
        return this.linkUrl;
    }


    public void setDestatus(java.lang.Integer destatus) {
        this.destatus = destatus;
    }

    public java.lang.Integer getDestatus() {
        return this.destatus;
    }


    public void setTitle(java.lang.String title) {
        this.title = title;
    }

    public java.lang.String getTitle() {
        return this.title;
    }


    public void setContent(java.lang.String content) {
        this.content = content;
    }

    public java.lang.String getContent() {
        return this.content;
    }

    public String getAreaCode() { return areaCode; }

    public void setAreaCode(String areaCode) { this.areaCode = areaCode; }

    public Date getStartTime() { return startTime; }

    public void setStartTime(Date startTime) { this.startTime = startTime; }

    public Date getEndTime() { return endTime; }

    public void setEndTime(Date endTime) { this.endTime = endTime; }

    public String getProvince() { return province; }

    public void setProvince(String province) { this.province = province; }

    public String getCity() { return city; }

    public void setCity(String city) { this.city = city; }

    public String getArea() { return area; }

    public void setArea(String area) { this.area = area; }

    public Integer getAdvertType() {
        return advertType;
    }

    public void setAdvertType(Integer advertType) {
        this.advertType = advertType;
    }
}
